set(TARGET_NAME kiran-cpanel-timedate)

file(GLOB_RECURSE TIMEDATE_SRC ./*.cpp ./*.h ./*.ui)

add_library(${TARGET_NAME} SHARED ${TIMEDATE_SRC})

target_include_directories(
  ${TARGET_NAME}
  PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
          ${CMAKE_CURRENT_SOURCE_DIR}/dbus-api-wrapper
          ${CMAKE_CURRENT_SOURCE_DIR}/pages
          ${PROJECT_SOURCE_DIR}/include
          ${X11_INCLUDE_DIRS}
          ${XRANDR_INCLUDE_DIRS}
          ${KIRAN_WIDGETS_QT5_INCLUDE_DIRS}
          ${KLOG_QT5_INCLUDE_DIRS}
          ${KIRAN_CONTROL_PANEL_PKG_INCLUDE_DIRS}
          ${KIRAN_CC_DAEMON_INCLUDE_DIRS}
          ${KIRAN_INTEGRATION_THEME_INCLUDE_DIRS})

target_link_libraries(
  ${TARGET_NAME} PRIVATE
  plugin-devel
  Qt5::Widgets
  Qt5::DBus
  Qt5::Svg
  Qt5::Network
  X11
  Xrandr
  ${X11_LIBRARIES}
  ${XRANDR_LIBRARIES}
  ${KIRAN_WIDGETS_QT5_LIBRARIES}
  ${KLOG_QT5_LIBRARIES}
  ${KIRAN_INTEGRATION_THEME_LIBRARIES})

# 安装插件
install(TARGETS ${TARGET_NAME} DESTINATION ${PLUGIN_LIBS_DIR})
